<?php
defined('_JEXEC') or die('Restricted access');

/**
 *
 * @author George Zeakis<zeageorge@google.com>
 */
interface DatabaseAdapterInterface {

    /**
     * @return boolean 
     */
    public function connect(array $dbData);
    
    public function disconnect();

    /**
     * select
     * @param string $sql An SQL string
     * @param array $array Paramters to bind
     * @param constant $fetchMode A PDO Fetch mode
     * @return array Returns Assoc array
     */
    public function select($sqlQuery, array $BindParams = array(), $fetchMode = PDO::FETCH_ASSOC);

    /**
     * insert
     * @param string $table A name of table to insert into
     * @param array $data An associative array
     * @return integer Returns the id of the inserted row
     */
    public function insert($table, array $data);
    
    /**
     * update
     * @param string $table A name of table to insert into
     * @param array $data An associative array
     * @param string $where the WHERE query part
     * @return integer Returns the number of affected rows
     */
    public function update($table, array $data, $where);
    
    /**
     * delete
     * @param string $table
     * @param string $where
     * @param integer $limit
     * @return integer Returns the number of affected rows
     */
    public function delete($table, $where, $limit = 1);
    
    public function delete_all($table, $where);
    
    /**
     * 
     * @return array
     */
    public function get_dbData();

    
}

?>
